<!DOCTYPE html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>栏目管理</title>
<link href="../static/web/css/admin2.css" rel="stylesheet" type="text/css">
<script src="js/global.js"></script>
<script src="js/context_menu.js"></script>
<script src="js/ieemu.js"></script>
<script src="js/dialog.js"></script>
<script src="../static/web/js/webajax2.js"></script>
<script>
function LoadSuns(ctid,tid)
{
    
  if($DE(ctid).innerHTML.length < 10){
      $DE('img'+tid).src = 'images/dedecontract.gif';
    var myajax = new DedeAjax($DE(ctid));
    myajax.SendGet('catalog_do.php?dopost=GetSunLists&cid='+tid);
  }
  else{ 
  showHide(ctid,tid); 
  }
}
function showHide(objname,tid)
{
    
    if($DE(objname).style.display=="none")
    {
        $DE('img'+tid).src = 'images/dedecontract.gif';
        $DE(objname).style.display = BROWSER.firefox? "" : "block";
    } else {
        $DE('img'+tid).src = 'images/dedeexplode.gif';
        $DE(objname).style.display="none";
    }
}
if(moz) {
  extendEventObject();
  extendElementModel();
  emulateAttachEvent();
}
//封面模板
function CommonMenuPart(eobj,obj,tid,tname)
{
  var popupoptions
  popupoptions = [
    new ContextItem("管理内容",function(){location="catalog_do.php?cid="+tid+"&dopost=listArchives";}),
    new ContextSeperator(),
    new ContextItem("预览分类",function(){ window.open("<?php echo $cfg_phpurl; ?>/list.php?tid="+tid); }),
    new ContextItem("更新HTML",function(){ location="makehtml_list.php?cid="+tid; }),
    new ContextItem("获取JS文件",function(){ location="catalog_do.php?cid="+tid+"&dopost=GetJs"; }),
    new ContextSeperator(),
    new ContextItem("增加子类",function(){location="catalog_add.php?id="+tid;}),
    new ContextItem("更改栏目",function(){location="catalog_edit.php?id="+tid;}),
    new ContextSeperator(),
    new ContextItem("移动栏目",function(){location='catalog_move.php?job=movelist&typeid='+tid}),
    new ContextItem("删除栏目",function(){location="catalog_del.php?id="+tid+"&typeoldname="+tname;}),
    new ContextSeperator(),
    new ContextItem("向上排前一级",function(){ location="catalog_do.php?cid="+tid+"&dopost=upRank"; }),
    new ContextItem("关闭菜单(<u>C</u>)",function(){})
  ]
  ContextMenu.display(eobj,popupoptions)
}
//跳转栏目
function SingleMenu(eobj,obj,tid,tname)
{
  var popupoptions
  popupoptions = [
    new ContextItem("更改栏目",function(){location="catalog_edit.php?id="+tid;}),
    new ContextSeperator(),
    new ContextItem("移动栏目",function(){location='catalog_move.php?job=movelist&typeid='+tid}),
    new ContextItem("删除栏目",function(){location="catalog_del.php?id="+tid+"&typeoldname="+tname;}),
    new ContextSeperator(),
    new ContextItem("向上排前一级",function(){ window.location="catalog_do.php?cid="+tid+"&dopost=upRank"; }),
  new ContextItem("关闭菜单(<u>C</u>)",function(){})
  ]
  ContextMenu.display(eobj,popupoptions)
}
</script>
<style>
.coolbg2{border: 1px solid #000000;background-color: #F2F5E9;height:18px}
.coolbt2{border-left: 2px solid #EFEFEF;border-top: 2px solid #EFEFEF;border-right: 2px solid #ACACAC;border-bottom: 2px solid #ACACAC;background-color: #F7FCDA}
.nbline{border-bottom: 1px solid #d6d6d6; background-color:#FFFFFF; }
.bline2{border-bottom: 1px solid #d6d6d6; background-color:#F9FCEF; }
.yixiaowan td{line-height:50px;padding: 0 6px;}
.yixiaowan td a{padding:0 3px;font-size:16px;}
.yixiaowan td a:hover{color:#039;text-decoration:underline;}
.coolbg{font-size:14px;}
.coolbg:hover,.coolbt:hover{color:#fff;background:#ff700a;}
.ke-sou:hover{background:#ff700a;border:1px solid #ff700a !important;}
.np{display:none;}
.bline a img{display:none;}
.bline img{position:relative;left:13px;}
.nbline a img{display:none;}
input{outline:none;}

/*其他样式*/
#edit{color:#fff;background-color:#03a193;font-size:14px;padding:3px 10px;border-radius:3px;text-decoration:none !important;}
#preview{color:#fff;background-color:#3f8bb4;font-size:14px;padding:3px 10px;border-radius:3px;text-decoration:none !important;}
#move{color:#fff;background-color:#28a745;font-size:14px;padding:3px 10px;border-radius:3px;text-decoration:none !important;}
#delete{color:#fff;background-color:#333;font-size:14px;padding:3px 10px;border-radius:3px;text-decoration:none !important;}
#edit:hover{background-color:#05c3b2;}
#preview:hover{background-color:#58acda;}
#move:hover{background-color:#28bd4a;}
#delete:hover{background-color:#000;}
</style>
<script type="text/javascript">
function checkSubmit()
 {
if(document.form3.kcss.value=='')
{
document.form3.kcss.focus();
alert("请输入栏目名称");
return false;}
}
</script>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8' onLoad="ContextMenu.intializeContextMenu()">
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf" align="center">
<tr>
<td height="28" style="padding:20px;background:#fff;">
<div style="float:left">
<form name='form3' action="jjTypeSearch.php" onSubmit="return checkSubmit();">
<input name="q" value="<?php echo $q; ?>" autocomplete="off" id="kcss" placeholder="栏目搜索..." style="float:left;width:150px;line-height:40px;padding:0 10px;border-radius:3px;font-size:14px;display:inline-block;margin-right:5px;"/>
<input type="submit" value="搜索" class="ke-sou" style="border:none;line-height:40px;border-radius:3px;padding:0 10px;border:1px solid #51acf9;">
</form>
</div>
</td>
</tr>
 
<form name='form1' method='post' action='catalog_do.php?dopost=upRankAll'>
<tr class="yixiaowan">
<td height="120" bgcolor="#FFFFFF" valign="top">
<?php
$sql = "select * from #@__arctype where typename like '%$q%' ";
$dsql->Execute('me',$sql);
while($arr = $dsql->GetArray('me'))
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td class="bline">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="50%">
<a href="catalog_do.php?cid=<?=$arr['id']?>&amp;dopost=listArchives" oncontextmenu="CommonMenu(event,this,<?=$arr['id']?>,'<?=$arr['typename']?>')"><?=$arr['typename']?>[ID:<?=$arr['id']?>]</a>
</td>
<td align="right">
<a href="catalog_edit.php?id=<?=$arr['id']?>&q=<?=$q?>" class="link" id="edit">编辑</a>
<a href="/apps/list.php?tid=<?=$arr['id']?>" target="_blank" class="link" id="preview">预览</a>
<a href="catalog_do.php?dopost=moveCatalog&amp;typeid=<?=$arr['id']?>" class="link" id="move">移动</a>
<a href="catalog_del.php?id=<?=$arr['id']?>&amp;typeoldname=<?=$arr['typename']?>" class="link" id="delete">删除</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" id="suns<?=$arr['id']?>" style="">
<table width="100%" border="0" cellspacing="0" cellpadding="0"></table>
</td>
</tr>
</tbody>
</table>
<?php 
}
?>
</td>
</tr>
</form>
</table>
</body>
</html>